import Cookies from 'vue-cookies'
const user = {
    state:{
        token:Cookies.get("token") || "",
        userInfo:Cookies.get("userInfo") || "",
    },
    mutations:{
        setToken(state,data){
            state.token = data
            Cookies.set("token",data)
        },
        setUserInfo(state,data){
            state.userInfo = data
            Cookies.set("userInfo",data)
        }

    },
    getters:{},
    actions:{},
    modules: {}
}
export default user
